
<div class="ibox">
  <div class="ibox-title">
	  <h5>机顶盒管理</h5>
	  <div class="nowrap pull-right" style="margin-top:10px">
	    <button onclick="refresh();" data-title="刷新状态" class='layui-btn layui-btn-small'>刷新状态</button>
	  </div>
  </div>
<div class="ibox-content fadeInUp animated">
  
<!-- 表单搜索 开始 -->
<form class="animated form-search" action="device/box" onsubmit="return false" method="get" data-search>

    <div class="row">
        <div class="col-xs-3">
            <div class="form-group">
                <input type="text" name="device_num" value="${search_device_num!''}" placeholder="设备编号"
                       class="input-sm form-control">
            </div>
        </div>

        <div class="col-xs-1">
            <div class="form-group">
            	<input type='hidden' value='1' name='page'/>
                <button type="submit" class="btn btn-sm btn-white"><i class="fa fa-search"></i> 搜索</button>
            </div>
        </div>
    </div>
</form>
<!-- 表单搜索 结束 -->
<form onsubmit="return false;" data-auto="" method="POST">
    <input type="hidden" value="resort" name="action"/>
    <table class="table table-hover">
        <thead>
            <tr>
                <th class='text-center'>ID</th>
                <th class='text-center'>设备注册码</th>
                <th class='text-center'>设备编号</th>
                <th class='text-center'>状态</th>
                <th class='text-center'>操作</th>
            </tr>
        </thead>
        <tbody>
        
        <#list page.data as model>
             <tr>
                <td class='text-center'>${model.id?c}</td>
                <td class='text-center'>${model.deviceId}</td>
                <td class='text-center'>${model.deviceNum?c}</td>
                <td class='text-center'>
                	 <#if model.isonline>
                        <span style="color:#090">在线</span>
                     <#else>
                        <span>离线</span>
                     </#if>
                </td> 
                <td class='text-center'>
	                <a data-open='device/log?id=${model.id?c}'  href="javascript:void(0)">查看日志</a>
                </td>
            </tr>
          </#list>      
       </tbody>
    </table>
<p>
<ul class="pagination pull-right"> 

<#import "/common/page.html" as p> 
  <@p.page data=page url="device/box" search_param=search_param />

</ul>
</p>
 
</form>

</div>  
</div>
<script>
function refresh(){
	$.form.reload();
}
</script>